package com.techsun.datanow.sync

import org.apache.spark.sql.SparkSession

/**
 * 数据同步特征
 *
 * @author Song
 * @date 2020/9/22
 */
trait TDataSync {
//  var mysqlUrl = "jdbc:mysql://hgmysql.mysql.database.chinacloudapi.cn:3306/sh_haagen?useSSL=false&requireSSL=false&characterEncoding=utf-8"
//  var mysqlDriver = "com.mysql.jdbc.Driver"
//  var mysqlUser = "uroot@up-vans-mysql01"
//  var mysqlPassword = "wic923d&f!C"

  /**
   * 同步工作方法
   *
   * @param spark             spark 会话对象
   * @param cosmosDbEndpoint  CosmosDB Endpoint
   * @param cosmosDbMasterkey CosmosDB Endpoint 对应的密钥
   * @param kuduMaster        kudu Master 节点
   * @return 同步成功或失败
   */
  def sync(spark: SparkSession, cosmosDbEndpoint: String, cosmosDbMasterkey: String, kuduMaster: String, beginTime: Long, endTime: Long): Boolean
}
